home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
coreaids.arc
/
DELETE.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-11-20
|
822b
|
37 lines
; DESC: Deletes a file V1.00
; IN: *{SEG_VAL} segment
; *{OFFSET} offset of filename to be deleted
; SAMPLE: Callm DELETE,<SEG_VAL,OFFSET>,
; ##################################################################
Extrn PUSHALL:Near
Extrn POPALL:Near
Extrn ERRORMSG:Near
DELETEC Segment
Assume CS:DELETEC
Public DELETE
;notice.
DB 'DELETE - V1.00, Copyright 1987, CoreTechs ',0DH,0AH
DELETE Proc Near ;deletes a file.
Call PUSHALL ;save registers.
Pop DX ;get filename offset.
Pop DS ;get filename segment.
Mov AH,41H ;delete a file.
Int 21H
Jc ERROR ;if error, report it.
Call POPALL ;restore registers.
Ret
ERROR: Push Ax ;report error and abort.
Call ERRORMSG
DELETE Endp
DELETEC Ends
End